import { BorrowBookState } from '@/pages/borrowBook/interface';
import { ReturnBookState } from '@/pages/returnBook/interface';
import { FetchListParams } from './borrowBook';
import request from './index';

export function fetchReturnBookList(
    params: FetchListParams,
): Promise<RDD<{ total: number; data: ReturnBookState[] }>> {
    return request.post('/getBookRentRecord', {
        data: {
            status: 2,
            ...params,
        },
    });
}
export function fetchReturnBookDetails(data: { rent_id: string }): Promise<RD> {
    return request.post('/getRentBookDetail', {
        data: {
            rent_id: data.rent_id,
        },
    });
}
